<!doctype html>
<html lang="zh-CN" data-rem="375">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>资讯详情页</title>
    <link rel="stylesheet" href="/css/style-news-detail.css">
    <style>
        body{
            padding-bottom: 50px;
        }
    </style>
</head>
<body>
<div class="project-detail-content">
    <div class="search-nav">
        <div class="back-arrow" onclick="window.history.go(-1)" ><img src="/img/common/arrow-left.png" alt="" class="back-img"></div>
        <div class="nav-title">{{$info->name}}</div>
        <a href="{{route('search')}}">
            <div class="search-img-wrapper"><img src="/img/common/search-icon-black.png" alt="" class="search-icon"></div>
        </a>
    </div>

    <div class="example-sec">
        <img src="{{$info->adv_map[0]}}" alt="" class="example-img"/>
        <div class="example-info">
            <div class="example-info-left">
                <img src="{{$info->logo}}" alt="" class="example-avatar">
                <div class="example-company">
                    <p class="example-company-name">{{$info->name}}</p>
                    <p class="example-company-fullname">{{$info->company_title}}</p>
                    <p class="example-company-type">分类：{{$info->parent_category->title}}-{{$info->category->title}}</p>
                </div>
            </div>
            <div class="example-info-right">
                <span class="example-info-right-txt">投资额</span>
                <p class="example-info-right-money"><strong class="money">{{$info->amount_show}}</strong></p>
            </div>
        </div>
    </div>

    <div class="get-data">
        <form class="get-data-form" method="post" action="{{route('apply.store')}}">
            <h1 class="get-data-title">免费获取资料</h1>
            <input type="text" name="username" placeholder="请输入您的姓名" class="get-name-ipt">
            <input type="tel"  name="phone" placeholder="请输入您的手机号码" class="get-mobile-ipt">
            <input type="hidden" name="entity_id" value="{{$info->id}}" >
            <input type="hidden" name="entity_type" value="project" >
            <input type="hidden" name="from" value="3" >
            <div class="submit"><img src="/img/common/submit-btn.png" alt="" class="submit-img"></div>
        </form>
    </div>

    <div class="introduce-sec">
        <ul class="tabs">
            <li class="tab-item tab-item-active"><a href="javascript:void(0);">加盟介绍</a></li>
            <li class="tab-item"><a href="javascript:void(0);">加盟优势</a></li>
            <li class="tab-item"><a href="javascript:void(0);">加盟条件</a></li>
            <li class="tab-item"><a href="javascript:void(0);">加盟费用</a></li>
            <li class="tab-item"><a href="javascript:void(0);">加盟支持</a></li>
            <li class="tab-item"><a href="javascript:void(0);">加盟流程</a></li>
        </ul>
        <div class="intro-item">
            <h1 class="intro-item-title">{{$info->name}}加盟介绍</h1>
            <p class="intro-item-detail">
                {{$info->join_desc}}
            </p>
            <img src="{{$info->join_desc_logo}}" alt="" class="intro-item-img">
        </div>
        <div class="intro-item" style="display: none;">
            <h1 class="intro-item-title">{{$info->name}}加盟优势</h1>
            <p class="intro-item-detail">
                {{$info->join_advantage}}
            </p>
            <img src="{{$info->join_advantage_logo}}" alt="" class="intro-item-img">
        </div>
        <div class="intro-item" style="display: none;">
            <h1 class="intro-item-title">{{$info->name}}加盟条件</h1>
            <p class="intro-item-detail">
                {{$info->join_condition}}
            </p>
            <img src="{{$info->join_condition_logo}}" alt="" class="intro-item-img">
        </div>
        <div class="intro-item" style="display: none;">
            <h1 class="intro-item-title">{{$info->name}}加盟费用</h1>
            <p class="intro-item-detail">
                {{$info->join_fee}}
            </p>
            <img src="{{$info->join_fee_logo}}" alt="" class="intro-item-img">
        </div>
        <div class="intro-item" style="display: none;">
            <h1 class="intro-item-title">{{$info->name}}加盟支持</h1>
            <p class="intro-item-detail">
                {{$info->join_support}}
            </p>
            <img src="{{$info->join_support_logo}}" alt="" class="intro-item-img">
        </div>
        <div class="intro-item" style="display: none;">
            <h1 class="intro-item-title">{{$info->name}}加盟流程</h1>
            <p class="intro-item-detail">
                {{$info->join_flow}}
            </p>
            <img src="{{$info->join_flow_logo}}" alt="" class="intro-item-img">
        </div>
    </div>

    <div class="get-data">
        <form class="get-data-form">
            <h1 class="get-data-title">免费获取资料</h1>
            <input type="text" name="username" placeholder="请输入您的姓名" class="get-name-ipt">
            <input type="tel"  name="phone" placeholder="请输入您的手机号码" class="get-mobile-ipt">
            <textarea rows="6" cols="20" wrap="hard" name="remark" placeholder="请输入留言备注" class="get-mark-ipt"></textarea>
            <input type="hidden" name="entity_id" value="{{$info->id}}" >
            <input type="hidden" name="entity_type" value="project" >
            <input type="hidden" name="from" value="3" >
            <div class="submit"><img src="/img/common/submit-btn.png" alt="" class="submit-img"></div>
        </form>
    </div>

    <div class="recommend-sec">
        <div class="recommend-sec-title">
            <h1 class="recommend-sec-title-txt">推荐项目</h1>
            <img src="/img/common/arrow-right.png" alt="" class="recommend-sec-title-arrow">
        </div>
        <div class="recommend-sec-list">
            @foreach($relate_project_list['list'] as $item)
                <a href="{{route('project.info', ['id' => $item->id])}}">
                    <div class="recommend-sec-item">
                        <div class="recommend-sec-item-top">
                            <img src="{{$item->adv_map[0]}}" alt="" class="recommend-sec-item-img">
                        </div>
                        <div class="recommend-sec-item-data">
                            <h1 class="recommend-sec-item-data-pro">{{$item->name}}</h1>
                            <p class="recommend-sec-item-data-company">{{$item->company_title}}</p>
                            <p class="recommend-sec-item-price">
                                投资金额: <strong class="recommend-sec-item-money">{{$item->amount_show}}</strong>
                            </p>
                        </div>
                    </div>
                </a>
            @endforeach
        </div>
        <div class="seemore">
            <a href="/project">
                <img src="/img/common/seemore-btn.png" alt="" class="seemore-img">
            </a>
        </div>
    </div>
    <div class="gulp-line"></div>

    <div class="relative-news-sec">
        <div class="recommend-sec-title">
            <h1 class="recommend-sec-title-txt">相关资讯</h1>
            <img src="/img/common/arrow-right.png" alt="" class="recommend-sec-title-arrow">
        </div>
        <ul class="relative-news-list">
            @foreach($relate_news_list['list'] as $item)
                <a href="{{route('news.info', ['id' => $item->id])}}">
                    <li class="relative-news-item">
                        <p class="relative-news-item-title">{{$item->name}}</p>
                        <p class="relative-news-item-clock"><span class="date">{{date('Y-m-d', strtotime($item->updated_at))}}</span><span class="time">{{date('H:i:s', strtotime($item->updated_at))}}</span></p>
                        <img src="/img/common/arrow-right.png" alt="" class="relative-news-item-arrow">
                    </li>
                </a>
            @endforeach
        </ul>
    </div>
</div>
<div class="project-detail-footer">

</div>
<script crossorigin="anonymous" integrity="sha384-qu2J8HSjv8EaYlbzBdbVeJncuCmfBqnZ4h3UIBZ9WTZ/5Wrqt0/9hofL0046NCkc" src="https://lib.baomitu.com/zepto/1.2.0/zepto.min.js"></script>
<script type="text/javascript" >
    $(function () {
        $(".tab-item").click(function (e) {
            $(this).addClass('tab-item-active');
            $(this).siblings().removeClass('tab-item-active');
            var index = $(this).index();
            $(".intro-item").each(function (i) {
                if (i == index) {
                    $(this).show();
                } else {
                    $(this).hide();
                }
            })
        });

        $(".submit-img").click(function () {
            var obj =  $(this).parents("form");
            $.post("{{route('apply.store')}}", obj.serialize(), function (result) {
                if (result.status_code == 200)
                    alert('申请成功');

                obj[0].reset();
            }, 'json')
        });
    });
</script>
</body>
</html>